<template>
  <swiper class="carrousel" ref="mySwiper" :options="swiperOptions">
    <swiper-slide v-for="banner in bannerImg" :key="banner.id">
      <a :href="banner.url">
        <img :src="'https://ss.lanqb.com/' + banner.picture" alt="" />
      </a>
    </swiper-slide>
    <div class="swiper-pagination" slot="pagination"></div>
  </swiper>
</template>

<script>
export default {
  name: 'carrousel',
  data() {
    return {
      swiperOptions: {
        pagination: {
          el: '.swiper-pagination',
        },
        loop: true,
        autoplay: true,
      },
    };
  },
  props: ['bannerImg'],
};
</script>

<style lang="less" scoped>
.carrousel {
  .swiper-pagination {
    text-align: right;
  }
  img {
    width: 100%;
    height: 1.3rem;
  }
}
</style>
